from django.db import models

class VirtDirs(models.Model):
    '''
        虚拟机目录
    '''
    name = models.CharField(max_length=65)
    sort = models.IntegerField()

class VirtList(models.Model):
    '''
        虚拟机列表
    '''
    uuid = models.CharField(max_length=36)
    vdir = models.ForeignKey(VirtDirs, on_delete=models.CASCADE, related_name='hosts')

class VncHostList(models.Model):
    '''
        本地主机端口
    '''
    host = models.IntegerField(null=False, verbose_name='主机')
    port = models.IntegerField(null=False, verbose_name='端口')
    token = models.CharField(max_length=32, verbose_name='认证信息')

    
